<template>
    <div>
    	<div class="graybg"></div>
		<div class="header header_bg">
  			<div class="header_left" onclick="javascript:history.back(-1)">
  				<i class="iconfont baiColor">&#xe612;</i>
  			</div>
  			<div class="header_center">
  				<span class="baiColor">会员</span>
  			</div>
  			<!--一共可购买四次，故不要明细
  				<div class="header_right">
  				<router-link to="/wmemberdetail">
  				<span class="baiColor" style="font-size: 14px;">明细</span>
  				</router-link>
  			</div>-->
  		</div>
  		<div class="center" style="padding-top: 47px;">
  			<div class="list">
  				<ul class="clearfix">
  					<li v-for="member in members">
  						<router-link :to="'/huiyuanDetail/'+member.member_id">
  							<div class="item">
	  							<div class="img_logo">
	  								<img :src="imgURL+member.member_img"/>
	  							</div>
	  							<div class="info">
	  								<p class="infos clearfix">{{member.member_name}}<span class="span pull-right">购物升级</span></p>
	  								<p class="price">￥{{member.member_price}}</p>
	  							</div>
  							</div>
  						</router-link>
  					</li>
  				</ul>
  			</div>
  		</div>
  		
    </div>

</template>


<script>
    export default{
        data(){
            return {
            	imgURL:this.imgURL,
				members:[
//					{
//						member_id:1,	//id
//						member_name:"",	//几星店主
//						monemember_pricey:"00.00",	//钱数
//						member_img:"" //图片
//					}
				]
            }
        },
        mounted(){
        	let _this = this;
			var info = window.localStorage.data;
			var params = new URLSearchParams();
			params.append('token', info);	//客户秘钥（信息）
			this.$axios({
			   url:"Home/User/shop_member",
				method:"post",
				data:params
			   }).then(function(res){
			   	console.log(res)
			   	var datas = res.data;
			   	if(datas.code == 0){
			   		alert("数据获取失败，请重新获取")
			   	}else if(datas.code == 1){
			   		_this.members = datas.data
			   	}else if(datas.code == 2){
			   		alert("数据为空")
			   	}else if(datas.code == 3){
			   		alert("缺少参数")
			   	}	
			}).catch(function(err){
				console.log(err)		
			})
       },
    }

</script>

<style scoped="scoped">
@import "../css/public.css";

.center{
	width: 95%;
	margin: 0 auto;
	margin-left: 12px;
}
.center .list ul li{
	float: left;
	background: #fff;
	margin-right: 5px;
	margin-bottom: 5px;
	width: 45%;
	height: 200px;
	text-align: center;
	padding: 0 5px;
	
}
.center .list .item .img_logo{
	width: 100px;
	height: 100px;
	margin: 30px auto 0;
}
.center .list .item .img_logo img{
	width: 100%;
	height: 100%;
}
.center .list .item .info{
	margin-top:15px ;
}
.center .list .item .infos{
	color: #333;
	font-size: 14px;
	text-align: left;
}
.center .list .item .infos .span{
	padding: 1px 7px;
	color: #F3961F;
	font-size: 14px;
	border: solid 0.5px #F3961F;
	border-radius: 12px;
}
.center .list .item .price{
	color: #F3961F;
	font-size: 16px;
	text-align: left;
	padding-bottom: 11px;
}
</style>
